package _10_ii;

import java.util.Scanner;

/**
 * @author ：Rwto
 * @date ：Created in 2021/7/12 13:25
 * @description：青蛙跳台阶问题  优化空间复杂度 O（1）
 */
public class Solution {
    public int numWays(int n) {

        int a = 1;
        int b = 1;
        for(int i = 2;i<=n;i++){
            int tmp = a+b;
            a = b;
            b = tmp%1000000007;
        }

        return b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            System.out.println(new Solution().numWays(n));
        }
    }
}
